home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 3 / Gold Medal Software - Volume 3 (Gold Medal) (1994).iso / music / 5mods_2.arj / BJ002.MOD < prev    next >
Text File  |  1994-01-20  |  5KB  |  122 lines

  1. ─────────────────────────────────────────────────────────────────────────┐
  2. │ Mod Name      : BJ002.MOD               Mod Author:  2@2504   WWIVnet  │
  3. │ Difficulty    : ███░░░░░░░                           2@2504  CHAOSnet  │
  4. │ WWIV Version  : 4.23                                 2@1        BJnet  │
  5. │ Mod Date      : 01/02/94                                               │
  6. │ Files Affected: BBS.C, LILO.C, COM.C, VARS.H                           │
  7. │ Description   : Gives users visible registration levels/ranks!         │
  8. └────────────────────────────────────────────────────────────────────────┘
  9.  
  10. Long Description:
  11.   This mod will give your users access levels like in WildCat!.
  12. It doesn't even modify the user records (yaay!); it does modify VARS.H
  13. so you'll have to recompile.
  14.  
  15. Notes:
  16.   You'll need to change the security levels to whatever you would like
  17. to use (see note in mod).
  18.  
  19. Disclaimer:
  20.                 I won't even degrade myself by posting one...
  21.  
  22. Key:
  23.         /*===*/  Existing line
  24.         /*+++*/  Add line
  25.         /*###*/  Modify line
  26.         /*---*/  Remove line
  27.  
  28. ═══════════════════════════{ Step 1 }═══════════════════════════════════
  29.  
  30. Shift that source into reverse (ie back it up!).
  31.  
  32. ═══════════════════════════{ Step 2 }═══════════════════════════════════
  33.  
  34. Open VARS.H and search for "nete[5]".  Make the following changes:
  35.  
  36. /*===*/     ver_no2[51],wwiv_net_no[20], xdate[9], *xenviron[50],
  37. /*###*/     dlfn[81],edlfn[81], nete[5], rank[50]; /* Add rank[50] */
  38. /*===*/
  39. /*===*/ __EXTRN__ unsigned char actsl, andwith, checksum;
  40.  
  41. Save/close VARS.H.
  42.  
  43. ═══════════════════════════{ Step 3 }═══════════════════════════════════
  44.         
  45. Open BBS.C and search for "print_net_listing(0)".  Add the following:
  46.  
  47. /*===*/   print_net_listing(0);
  48. /*+++*/ if (strcmp(s,"RANK")==0) {
  49. /*+++*/   rank_em();
  50. /*+++*/   nl();
  51. /*+++*/   npr("Your User Status is: %s",rank);
  52. /*+++*/   nl();
  53. /*+++*/ }
  54. /*===*/ if (strcmp(s,"QSCAN")==0) {
  55.  
  56. Save/close BBS.C.
  57.  
  58. ═══════════════════════════{ Step 4 }═══════════════════════════════════
  59.  
  60. Open LILO.C and search for "useron=1;".  Add the following:
  61.  
  62. /*===*/   hangup=1;
  63. /*===*/   return;
  64. /*===*/ }
  65. /*+++*/ rank_em();     /* Added by BJ002.MOD */
  66. /*===*/ useron=1;
  67. /*===*/ write_inst(INST_LOC_LOGON,0,INST_FLAGS_ONLINE);
  68.  
  69. Search for "pl(nam(&thisuser,usernum));" a little further down.  Add this:
  70.  
  71. /*===*/ pl(nam(&thisuser,usernum));
  72. /*+++*/ npr("Access............ %s\n\r",rank);  /* Add me */
  73. /*===*/ outstr(get_string(363)); npr("%d\r\n", (int) ((nsl()+30)/60.0));
  74.  
  75. Save/close LILO.C.
  76.  
  77. ═══════════════════════════{ Step 5 }═══════════════════════════════════
  78.  
  79. Open COM.C and add the following function at the end:
  80.  
  81. ------------------------------------------------------------------------
  82. /* BJ002.MOD block begin */
  83. void rank_em(void)
  84. {
  85.  if (thisuser.sl==255)
  86.   sprintf(rank,"System Operator");
  87.  if (thisuser.sl<=254 && thisuser.sl>=200)
  88.   sprintf(rank,"Assistant System Operator");
  89.  if (thisuser.sl<200 && thisuser.sl>=175)        /* Customize SL's */
  90.   sprintf(rank,"Level 5 [V.I.P. User]");
  91.  if (thisuser.sl<175 && thisuser.sl>=150)        /* Customize SL's */
  92.   sprintf(rank,"Level 4 [Registered User]");
  93.  if (thisuser.sl<150 && thisuser.sl>=100)        /* Customize SL's */
  94.   sprintf(rank,"Level 3 [Registered User]");
  95.  if (thisuser.sl<100 && thisuser.sl>=75)         /* Customize SL's */
  96.   sprintf(rank,"Level 2 [Registered User]");
  97.  if (thisuser.sl<75 && thisuser.sl>=50)          /* Customize SL's */
  98.   sprintf(rank,"Level 1 [Registered User]");
  99.  if (thisuser.sl<50 && thisuser.sl>=25)          /* Customize SL's */
  100.   sprintf(rank,"Level 0 [Unregistered User]");
  101.  if (thisuser.sl==20)                            /* Customize SL's */
  102.   sprintf(rank,"*User on Probation*");
  103.  if (thisuser.sl==10)                            /* Customize SL's */
  104.   sprintf(rank,"New User");
  105.  if (thisuser.sl<10)                             /* Customize SL's */
  106.   sprintf(rank,"<*> SUSPENDED USER <*>");
  107. }
  108. /* BJ002.MOD block end */
  109. ------------------------------------------------------------------------
  110.  
  111. Save/close COM.C.
  112.  
  113. ═══════════════════════════{ End Mod }══════════════════════════════════
  114.  
  115.  I would suggest running a MAKE FCNS here because you must recompile the
  116. BBS anyway.  Please drop me a line (2@2504 WWIVnet / CHAOSnet) and let me
  117. know that you're using this mod, or what you think.
  118.  You can add the rank variable to just about anywere... SysOplog, message
  119. headers, user lists, etc.
  120.  
  121.  
  122.